{include file="public/header" /}


<div class="page">
    
    <form id="store_form" method="post" enctype="multipart/form-data">
        <input type="hidden" name="store_id" value="{$store_array.id}" />
        <table class="ds-default-table">
            <tbody>


<!--            合同信息-->
            <tbody id="tr_store_contract">
            <tr class="noborder">
                <td class="required"><label class="validation" for="contract_name">{$Think.lang.contract_name}:</label></td>
                <td class="vatop rowform"><input type="text" value="{$store_array.contract_name}" id="contract_name" name="contract_name" class="txt" /></td>
                <td class="vatop tips"></td>
            </tr>

            <tr class="noborder">
                <td class="required"><label class="validation" for="contract_type">{$Think.lang.contract_type}:</label></td>
                <td class="vatop rowform">
                    <select name="contract_type"  id="contract_type">
                        <option value="">请选择</option>
                        <option value="客户" {$store_array.contract_type == '客户' ? 'selected' : ''}>客户</option>
                        <option value="大客户" {$store_array.contract_type == '大客户' ? 'selected' : ''}>大客户</option>
                        <option value="运营商" {$store_array.contract_type == '运营商' ? 'selected' : ''}>运营商</option>
                        <option value="供应商" {$store_array.contract_type == '供应商' ? 'selected' : ''}>供应商</option>
                    </select>
                </td>
                <td class="vatop tips"></td>
            </tr>

            <tr class="noborder">
                <td class="required"><label class="" for="contract_file">{$Think.lang.contract_file}:</label></td>
                <td class="vatop rowform">
                    <input name="contract_file" id="contract_file" type="file" class="w200" />
                </td>
                <td class="vatop tips">{$store_array.contract_file}</td>
            </tr>

            <tr class="noborder">
                <td class="required"><label class="" for="contract_img">{$Think.lang.contract_img}:</label></td>
                <td class="vatop rowform">
                    <input name="contract_img" id="contract_img" type="file" class="w200" />
                </td>
                <td class="vatop tips">{$store_array.contract_img}</td>
            </tr>

            <tr class="noborder">
                <td class="required"><label class="" for="contract_other">{$Think.lang.contract_other}:</label></td>
                <td class="vatop rowform"><textarea name="contract_other" id="contract_other" cols="30" rows="10">{$store_array.contract_other}</textarea></td>
                <td class="vatop tips"></td>
            </tr>
            </tbody>
            <tfoot>
                <tr class="tfoot">
                    <td colspan="15"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
                </tr>
            </tfoot>
        </table>
    </form>
</div>
<script type="text/javascript">
    $(function () {


        $('#store_form').validate({
            errorPlacement: function (error, element) {
                error.appendTo(element.parentsUntil('tr').parent().find('td:last'));
            },
            rules: {

                contract_name: {
                    required: true
                }
            },
            messages: {
                contract: {
                    contract_name: '合同名称不能为空'
                }
            }
        });
    });
</script>
